package com.pactera.asmp.server.entity;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.util.Date;
import java.util.List;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class RoleDTO {
    private Integer id;
    @NotNull(message = "角色名称不允许为空")
    @Size(min = 1,max = 50,message = "角色名称长度1-50")
    @Pattern(regexp = "^[^\\s]+(\\s+[^\\s]+)*$", message = "角色名称格式不正确")
//    @Pattern(regexp = "^[^￥#%…&*@\\s]*$", message = "角色名称格式不正确")
    private String roleName;
    @Size(max = 50,message = "描述长度0-50")
    private String descpt;
    @NotNull(message = "角色编码不允许为空")
    @Size(min = 1,max = 20,message = "角色编码长度1-20")
    private String code;
    private Integer insertUid;
    private Date insertTime;
    private Date updateTime;
    private List<Integer> permIds;
    @NotNull(message = "角色等级不允许为空")
    private Integer level;
}
